/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycompany.delivery.dao;

import com.mycompany.delivery.entities.Employee;
import java.util.List;

/**
 *
 * @author Martin Huněk
 */
public interface EmployeeDAO {
    
    
    /**
     * Add new employee to database
     * @param employee
     */
   public void createEmployee(Employee employee);

    /**
     * Update old employee to new one in database
     * @param employee
     */
    public void updateEmployee(Employee employee);

    /**
     * Delete employee from database
     * @param employee
     */
    public void deleteEmployee(Employee employee);

    /**
     * Return employee by its ID
     * @param id
     * @return Employee
     */
    public Employee getEmployeeById(Long id);

    /**
     * Return employee by its login
     * @param login
     * @return Employee
     */
    public Employee getEmployeeByLogin(String login);

    /**
     * Return all employee
     * @return List<Employee>
     */   
   public List<Employee> getAllEmployees();
    
   /**
    * Check if login is unique (any other employee or courier dont have same login)
    * @param login 
    * @return return true if login is unique
    */
   public boolean isLoginUnique(String login);
}
